<!DOCTYPE html>
<html>
<head>
  <title></title>
  <!--[if lt IE 9]>
  <meta http-equiv="refresh" content="0;ie.html" />
  <![endif]-->

  <link rel="shortcut icon" href="__STATIC__/layout/favicon.ico">
   <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
   <link href="__STATIC__/layout/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
  <link href="__STATIC__/layout/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
  <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
  <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
  <link href="__STATIC__/layout/css/channel.css?v=4.1.0" rel="stylesheet">
  <link href="__STATIC__/layout/css/plugins/iCheck/custom.css" rel="stylesheet">
 
  <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
  <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">

  <!-- Sweet Alert -->
  <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">

  <!-- Sweet alert -->
 <link href="__STATIC__/layout/js/plugins/select/bootstrap-select.css" rel="stylesheet">
 <style>
    .modal-body .table tbody tr td{
      border:0;
    }
     .modal-body input.form-control{
      width: 180px;
     }
     .modal-body input.form-control,.modal-body select.form-control{
      height: 26px;
      border-radius: 4px;
     }
     .orderDiv{
        display: none;
     }
     .orderDivActive{
        display: block;
     }
     .fixed-table-container{
      height: 380px !important;
     }
     .search input.form-control{
      height: 26px;
      border-radius: 4px;
     }
     .sub-tag{
      color: #00a7f2;
      border: 1px solid rgba(0,167,242,.4);
      display: inline-block;
     }
     .orderNumspan{
      cursor: pointer;
     }
 </style>
</head>
<body class="white-bg" style="color:#333;padding:3px;">
 <!-- 标题 -->
    <div class="page-heade">
        <h2 class="title_color text-center">订单列表</h2>
    </div>
    <!-- 标题 -->
<div class="row-margin-top" >
<form role="form" id="form1" class="form-inline" method="get" action="#">
  <table class="table-bordered table">
    <tr>
      <td style="width: 140px;" class="text-right">订单类型：</td>
      <td>
       <select class="selectpicker show-menu-arrow" data-style="btn-white" id="orderleixing">
           <option>全部订单</option>
           <option>待处理订单</option>
           <option>未完成订单</option>
           <option>已完成订单</option>
           <option>已作废订单</option>
        </select>

      </td>
       <td style="width: 140px;" class="text-right">订单时间：</td>
        <td>
       <select class="selectpicker show-menu-arrow" data-style="btn-white" id="orderTime">
           <option>最近30天</option>
           <option>本月</option>
           <option>上季度</option>
           <option>本季度</option>
           <option>上一年</option>
           <option>本年</option>
        </select>

      </td>
      <td style="width: 140px;" class="text-right">自定义申请时间：</td>
      <td>
          <div class="form-group">
            <input type="text" id="start" class="form-control layer-date " style="min-width:120px;width:120px;display: inline-block;" name="">
           </div>
            <div class="form-group">
                至
            </div>
           <div class="form-group">
            <input type="text" class="form-control layer-date" style="min-width:120px;width:120px;display: inline-block;" id="end" name="">
           </div>
      </td>
    </tr>
    <tr>
      <td class="text-right">订单编号:</td>
      <td><input type="text" class="form-control" name="" id=""></td>
       <td class="text-right">代理商名称:</td>
      <td><input type="text" class="form-control" name="" id=""></td>
      <td colspan="2"><button class="btn btn-info btn-sm" type="button">查询</button>&nbsp;&nbsp;<button class="btn-warning btn btn-sm" type="button" data-toggle="modal" data-target="#myModal">高级搜索</button></td>
    </tr>
  </table>
    </form>
  </div>
    <table data-toggle="table" id="exampleTableEvents" data-escape="true" data-striped="true" data-height="400" data-mobile-responsive="true" data-sort-name="Score" data-sort-order="desc" >
                                    <thead>
                                        <tr class="info">
                                            <th data-field="state" data-checkbox="true" ></th>
                                            <th data-field="id">ID</th>
                                            <th data-field="orderNum">订单号</th>
                                            <th data-field="xiadanTime" data-sortable="true">下单时间</th>
                                            <th data-field="customerName" data-sortable="true">客户名称</th>
                                            <th data-field="customerNum">客户编码</th>
                                            <th data-field="price">金额</th>
                                            <th data-field="chukuOrsend">出库/发货</th>
                                            <th data-field="status" data-sortable="true">状态</th>
                                            <th data-field="shoukuanStatus">收款状态</th>
                                            <th data-field="beizhu">备注</th>
                                            <th data-field="fapiaolx">发票类型</th>
                                            <th data-field="jhdate">交货日期</th>
                                            <th data-field="shouhuoman">收货人</th>
                                            <th data-field="tellphone">联系方式</th>
                                            <th data-field="address">收货地址</th>
                                            <th data-field="yewuyuan">业务员</th>
                                            <th data-field="zhidanren">制单人</th>
                                            <th data-field="wuliuNum">物流编码</th>
                                        </tr>
                                    </thead>
    </table>
<div class="modal fade" tabindex="-1" role="dialog" id="myModal" aria-labelledby="gridSystemModalLabel">
  <div class="modal-dialog modal-lg" role="document" style="width:1200px !important">
    <div class="modal-content">
       <form action="" class="form-inline">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" style="font-size: 16px">&times;</span></button>
        <h2 class="modal-title" id="gridSystemModalLabel">高级搜索</h2>
      </div>
      <div class="modal-body">
          <table class="table" style="border:0">
              <tbody style="border:0">
                <tr>
                <td class="text-right">订货单号</td>
                <td>
                  <input type="text" class="form-control" name="" id="" placeholder="请输入订货单号">
                </td>
                <td class="text-right">
                  <select name="" id="" class="form-control  show-menu-arrow">
                    <option value="">下单时间</option>
                    <option value="">交货时间</option>
                    <option value="">财务审核时间</option>
                  </select>
                   <select class="form-control  show-menu-arrow">
                      <option>最近30天</option>
                      <option>本月</option>
                      <option>上季度</option>
                      <option>本季度</option>
                      <option>上一年</option>
                      <option>本年</option>
                    </select>
                </td>
                <td>
                    <div class="form-group">
            <input type="text" id="start" class="form-control layer-date " style="min-width:120px;width:120px;display: inline-block;" name="">
           </div>
            <div class="form-group">
                至
            </div>
           <div class="form-group">
            <input type="text" class="form-control layer-date" style="min-width:120px;width:120px;display: inline-block;" id="end" name="">
           </div> 
                </td>
              </tr>
              <tr>
                <td class="text-right">代理商名称</td>
                <td><input type="text" class="form-control" name="" id="" placeholder="请输入代理商"></td>
                <td class="text-right">代理商级别</td>
                <td>
                    <select class="selectpicker show-menu-arrow" data-style="btn-white" id="">
                          <option>全部</option>
                          <option>一级代理</option>
                          <option>二级代理</option>
                          <option>三级代理</option>
                          <option>待签代理</option>
                          <option>普通</option>
                       </select>
                </td>
              </tr>
                <tr>
                    <td class="text-right">收货信息</td>
                    <td><input type="text" class="form-control" name="" id="" placeholder="收货人/收货电话/代理商"></td>
                    <td class="text-right">归属部门</td>
                    <td>
                      <select class="selectpicker show-menu-arrow" data-style="btn-white" id="">
                          <option>全部</option>
                          <option>华东地区</option>
                          <option>总部区域</option>
                          <option>华中地区</option>
                          <option>华南地区</option>
                          <option>华北地区</option>
                          <option>门店</option>
                          <option>总部</option>
                          <option>渠道销售部</option>
                       </select>
                  </td>
               </tr>
               <tr>
                   <td class="text-right">商品信息</td>
                    <td><input type="text" class="form-control" name="" id="" placeholder="输入商品名称/编码/条形码/关键字"></td>
                     <td class="text-right">制单人</td>
                    <td><input type="text" class="form-control" name="" id="" placeholder="输入制单人"></td>
               </tr>
               <tr>
                  <td class="text-right">业务员</td>
                  <td>
                    <input type="text" class="form-control" placeholder="请选择业务员"> 
                  </td>
                  <td colspan="2"></td>
               </tr>
               <tr>
                  <td class="text-right">
                    <div class="dropdown">
                      <button id="dLabel" class="btn btn-white btn-sm" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="border:0">
                          订单状态
                       <span class="caret"></span>
                      </button>
                     <ul class="dropdown-menu" aria-labelledby="dLabel" style="min-width: 94px;" id="orderlist">
                        <li><a href="javascript:;">订单状态</a></li>
                        <li><a href="javascript:;">出库状态</a></li>
                        <li><a href="javascript:;">发货状态</a></li>
                      </ul>
                    </div>
                  </td>
                  <td colspan="3">
                     <div class="orderDiv orderDivActive">
                          <label class="checkbox-inline i-checks">
                                        <input type="checkbox" value="0">全选</label>
                          <label class="checkbox-inline i-checks">
                                        <input type="checkbox" value="待订单审核">待订单审核</label>
                          <label class="checkbox-inline i-checks">
                                        <input type="checkbox" value="待财务审核">待财务审核</label>
                          <label class="checkbox-inline i-checks">
                                        <input type="checkbox" value="待出库审核">待出库审核</label>
                          <label class="checkbox-inline i-checks">
                                        <input type="checkbox" value="待发货确认">待发货确认</label>
                          <label class="checkbox-inline i-checks">
                                        <input type="checkbox" value="待收货确认">待收货确认</label>
                           <label class="checkbox-inline i-checks">
                                        <input type="checkbox" value="已完成">已完成</label>
                           <label class="checkbox-inline i-checks">
                                        <input type="checkbox" value="已作废">已作废</label>
                     </div>
                     <div class="orderDiv">
                          <label class="radio-inline i-checks" >
                                        <input type="radio" value="全部" name="chuku">全部</label>
                          <label class="radio-inline i-checks">
                                        <input type="radio" value="未出库" name="chuku">未出库</label>
                          <label class="radio-inline i-checks">
                                        <input type="radio" value="部分出库" name="chuku">部分出库</label>
                           <label class="radio-inline i-checks">
                                        <input type="radio" value="部分出库" name="chuku">已出库</label>
                     </div>
                     <div class="orderDiv">
                           <label class="radio-inline i-checks">
                                        <input type="radio" value="全部" name="chuku">全部</label>
                          <label class="radio-inline i-checks">
                                        <input type="radio" value="未发货" name="chuku">未发货</label>
                          <label class="radio-inline i-checks">
                                        <input type="radio" value="部分发货" name="chuku">部分发货</label>
                           <label class="radio-inline i-checks">
                                        <input type="radio" value="已发货" name="chuku">已发货</label>
                     </div>
                  </td>
               </tr>
               <tr>
                  <td class="text-right">收款状态</td>
                  <td colspan="3">
                      <label class="checkbox-inline i-checks">
                                        <input type="checkbox" value="0">全选</label>
                          <label class="checkbox-inline i-checks">
                                        <input type="checkbox" value="未收款">未收款</label>
                          <label class="checkbox-inline i-checks">
                                        <input type="checkbox" value="收款待审核">收款待审核</label>
                          <label class="checkbox-inline i-checks">
                                        <input type="checkbox" value="部分收款">部分收款</label>
                          <label class="checkbox-inline i-checks">
                                        <input type="checkbox" value="已收款">已收款</label>
                         
                  </td>
               </tr>
               <tr>
                  <td class="text-right">订单标签</td>
                  <td colspan="3">
                     <label class="radio-inline i-checks">
                                        <input type="radio" value="全部" name="orderlabel">不限</label>
                      <label class="radio-inline i-checks">
                                        <input type="radio" value="特价单" name="orderlabel">特价单</label>
                      <label class="radio-inline i-checks">
                                        <input type="radio" value="非特价单" name="orderlabel">非特价单</label>
                      <label class="radio-inline i-checks">
                                        <input type="radio" value="秒杀订单" name="orderlabel">秒杀订单</label>
                  </td>
               </tr>
                <tr>
                  <td class="text-right">下单方式</td>
                  <td colspan="3">
                     <label class="radio-inline i-checks">
                                        <input type="radio" value="全部" name="xiadanway">全部</label>
                      <label class="radio-inline i-checks">
                                        <input type="radio" value="代下单" name="xiadanway">代下单</label>
                      <label class="radio-inline i-checks">
                                        <input type="radio" value="自主下单" name="xiadanway">自主下单</label>
                  </td>
               </tr>
              </tbody>
          </table>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-primary">确认</button>
      </div>
      </form>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div>
  <script src="__STATIC__/layout/js/jquery.min.js"></script>
  <script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
  <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
  <!-- layer javascript -->
  <script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
  <script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
  <script src="__STATIC__/layout/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
  <script src="__STATIC__/layout/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
  <script src="__STATIC__/layout/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
   <script type="text/javascript" src="__STATIC__/layout/js/plugins/select/bootstrap-select.js"></script> 
     <script src="__STATIC__/layout/js/plugins/chosen/chosen.jquery.js"></script>
       <script src="__STATIC__/layout/js/plugins/iCheck/icheck.min.js"></script>
    <!-- Peity -->
  <!-- <script src="__STATIC__/layout/js/demo/bootstrap-table-demo.js"></script> -->
</body>
</html>
<script>
  $(function(){
    $(document).on("click",".orderNumspan",function(){
       location.href ="{:url('other/freedetailitem')}"
    })
  })
    $(function () {
            $('[data-toggle="tooltip"]').tooltip()
    })
    $(document).ready(function () {
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
        });


$('#orderleixing').on("change",function(){
   console.log($(this).selectpicker('val'))
})

var str='<span class="caret"></span>'
$("#orderlist li").click(function(){
  var i = $(this).index();
  console.log(i)
  $('.orderDiv').eq(i).addClass('orderDivActive').siblings().removeClass('orderDivActive');
   $("#dLabel").html($(this).find('A').text()+str)
})

     //日期范围限制
        var start = {
            elem: '#start',
            format: 'YYYY/MM/DD',
            min: laydate.now(), //设定最小日期为当前日期
            max: '2099-06-16 23:59:59', //最大日期
            istime: true,
            istoday: false,
            choose: function (datas) {
                end.min = datas; //开始日选好后，重置结束日的最小日期
                end.start = datas //将结束日的初始值设定为开始日
            }
        };
        var end = {
            elem: '#end',
            format: 'YYYY/MM/DD',
            min: laydate.now(),
            max: '2099-06-16 23:59:59',
            istime: true,
            istoday: false,
            choose: function (datas) {
                start.max = datas; //结束日选好后，重置开始日的最大日期
            }
        };
        laydate(start);
        laydate(end);

     /*请输入关键字或空格查询*/
 
  /*  $(function () {
        //新增
        $('#new').on('click',function () {

            //iframe层-父子操作
            layer.open({
                type: 2,
                title: '新增',
                area: ['500px', '400px'],
                fixed: false, //不固定
                maxmin: true,
                content: '{:url("addview")}'
            });
            return false

        })

    //修改
    $('.xiugai').on('click',function () {
            var id = $(this).data('id')
            //iframe层-父子操作
            layer.open({
                type: 2,
                title: '修改',
                area: ['500px', '400px'],
                fixed: false, //不固定
                maxmin: true,
                content: '{:url("updateview")}?id='+id
            });
            return false
        })

    //删除
        $('.shanchu').click(function () {
            var id = $(this).data('id')
            swal({
                title: "您确定要删除这条信息吗",
                text: "删除后将会出现在回收站！",
                type: "warning",
                showCancelButton: true,
                confirmButtonColor: "#DD6B55",
                confirmButtonText: "删除",
                closeOnConfirm: false
            }, function () {
                $.ajax({
                    'type':'post',
                    'url':'{:url("delete")}',
                    'data':{'id':id},
                    'dataType':'json',
                    'success':function (data) {
                        if(data.success){
                            location.reload()
                        }else
                            swal(data.msg, "", "error");
                    }
                })

            });
        });

    })*/





  (function() {
    $('#exampleTableEvents').bootstrapTable({
      url: "__STATIC__/layout/js/demo/bootstrap_table_test.json",
      search: true,
      pagination: true,
      showRefresh: true,
      showToggle: true,
      showColumns: true,
      iconSize: 'outline',
      toolbar: '#exampleTableEventsToolbar',
      icons: {
        refresh: 'glyphicon-repeat',
        toggle: 'glyphicon-list-alt',
        columns: 'glyphicon-list'
      }
    });

    var $result = $('#examplebtTableEventsResult');

    $('#exampleTableEvents').on('all.bs.table', function(e, name, args) {
         console.log($(this))
      })
      // .on('click-row.bs.table', function(e, row, $element,field,args) {
      //   alert($(this));
      //   console.log($result.text(args))
      //   console.log($(this))
      // })
      // .on('dbl-click-row.bs.table', function(e, row, $element) {
      //   $result.text('Event: dbl-click-row.bs.table');
      // })
      .on('sort.bs.table', function(e, name, order) {
        $result.text('Event: sort.bs.table');
      })
      .on('check.bs.table', function(e, row) {
        $result.text('Event: check.bs.table');
      })
      .on('uncheck.bs.table', function(e, row) {
        $result.text('Event: uncheck.bs.table');
      })
      .on('check-all.bs.table', function(e) {
        $result.text('Event: check-all.bs.table');
      })
      .on('uncheck-all.bs.table', function(e) {
        $result.text('Event: uncheck-all.bs.table');
      })
      .on('load-success.bs.table', function(e, data) {
        $result.text('Event: load-success.bs.table');
      })
      .on('load-error.bs.table', function(e, status) {
        $result.text('Event: load-error.bs.table');
      })
      .on('column-switch.bs.table', function(e, field, checked) {
        $result.text('Event: column-switch.bs.table');
      })
      .on('page-change.bs.table', function(e, size, number) {
        $result.text('Event: page-change.bs.table');
      })
      .on('search.bs.table', function(e, text) {
        $result.text('Event: search.bs.table');
      });
  })();
</script>